package com.mygdx.screen;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.mygdx.game.MyGdxGame;

/**
 * @Title: EndScreen
 * @Author RuoLi
 * @Package com.mygdx.screen
 * @Date 2023/12/17 15:20
 * @description: 游戏结束场景
 */
public class EndScreen implements Screen {
    private MyGdxGame game;
    Stage stage;

    public EndScreen(MyGdxGame game) {
        this.game = game;
        Label.LabelStyle labelStyle = new Label.LabelStyle(MyGdxGame.font, Color.WHITE);
        String str = "End Screen";
        Label label = new Label(str, labelStyle);
        stage = new Stage();
        stage.addActor(label);
    }

    @Override
    public void show() {

    }

    @Override
    public void render(float delta) {
        Gdx.gl.glClearColor(0, 0, 0, 0);
        Gdx.gl.glClear(Gdx.gl20.GL_COLOR_BUFFER_BIT);
        stage.act();
        stage.draw();
    }

    @Override
    public void resize(int width, int height) {

    }

    @Override
    public void pause() {

    }

    @Override
    public void resume() {

    }

    @Override
    public void hide() {

    }

    @Override
    public void dispose() {

    }
}
